<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DT/Public/home/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo ($title); ?>--<?php echo ($com); ?></title>
<link href="/Public/home/css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="/Public/home/css/animate.css"/>
</head>
<body>
<div class="header" id="header">
  <div class="wrapper flow">
    <p class="logo fl"><a href=""><img class="pic01" src="/Public/home/images/logo02.png" /><img class="pic02" src="/Public/home/images/logo03.png" /></a></p>
    <ul class="nav fl"> 
      		<?php
 $_id = intval(0); $where = array('cateid'=> $_id, 'is_nav' => 1); if(0 > 0){ $catelist = M('category')->where($where)->select(); }else{ $list = M('category')->select(); $_list = M('category')->where($where)->select(); $_catlist = Common\Lib\Category::subtree($list,$_id); $cate=array_merge($_list,$_catlist); $catelist=Common\Lib\Category::make_tree($cate); } if($_id==0){ $list = M('category')->where("is_nav=1")->select(); $cat=Common\Lib\Category::make_url($list); $catelist=Common\Lib\Category::make_tree($cat); } if (empty($catelist)) { $catelist = array(); } foreach($catelist as $auto => $cate): ?><li><a href="<?php echo ($cate["cate_url"]); ?>"><?php echo ($cate["catename"]); ?></a>
        <ul class="sub_nav">
          <?php if(is_array($cate['children'])): $i = 0; $__LIST__ = $cate['children'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><li><a  href="<?php echo ($v["cate_url"]); ?>"><?php echo ($v["catename"]); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
      </li><?php endforeach;?>
    </ul>
  </div>
</div>
<!--headerEnding-->
<script type="text/javascript" src="/Public/home/js/jquery-1.7.2.min.js"></script> 
<script src="/Public/home/js/posfixed03.js"></script> 
<script type="text/javascript" src="/Public/home/js/countUp.min.js"></script> 
<script>
$(".history_box #apart08 .inofr p:first").css("background","none")
$(".history_box #apart08 .inofr p:first span").addClass("first")
</script> 
<!--[if !IE]><!--><script type="text/javascript" src="/Public/home/js/returnTop.js"></script><!--<![endif]--> 
<!--[if gt IE 6]>
<script src="/Public/home/js/returnTop.js"></script>
<![endif]--> 
<script type="text/javascript" src="/Public/home/js/wow.min.js"></script>


<!--headerEnding-->
<div class="sub_banner"><img src="/Public/home/images/banner_news.jpg" /></div>
<!--bannerEnding-->
<div class="sub_content">
  <div class="breadcrumbs">
    <div class="wrapper">
      <p class=""><?php
 $_id = intval(3); $_pathname = "xinwen/gong"; $cateid=M("category")->where("pathname='".$_pathname."'")->getField("cateid"); $catename=M("category")->where("pathname='".$_pathname."'")->getField("catename"); $cate=M("category")->select(); $_list=Common\Lib\Category::getParents($cate,$cateid); if($_list){ $modelid=M("category")->where("pathname='".$_pathname."'")->getField("modelid"); $tablename=M("model")->where("modelid=$modelid")->getField("table"); $name="model_".$tablename; $where = array('id' => $_id); $info=M("$name")->where($where)->find(); $title=$info['title']; $_list=implode(' > ',$_list); if($title){ echo "<a href='/m/index.shtml'>首页</a><span>&gt;</span>$_list > $title"; }else{ echo "<a href='/m/index.shtml'>首页</a><span>&gt;</span>$_list"; } }else{ echo "首页<span>&gt;</span>"; } ?></p>
    </div>
  </div>
  <div class="sub_main">
    <div class="news_box">
      <div class="wrapper">
        		<?php
 $_id = intval(3); $_cateid = intval(0); $_pathname = "xinwen/gong"; if($_cateid==0){ $w = array('pathname'=> $_pathname); }else{ $w = array('cateid'=> $_cateid); } $where = array('id'=> $_id); $model=M('category')->where($w)->find(); $modelid=$model['modelid']; $table=M('model')->where("modelid=$modelid")->find(); $name="model_".$table['table']; $_list=M("$name")->where($where)->select(); foreach($_list as $k=>$v){ $_list[$k]['content'] = html_entity_decode($_list[$k]['content']); $thumb=intval($_list[$k]['thumb']); $url= M('files')->where("id=$thumb")->getField('path'); $_list[$k]['imgurl']=$url; } if (empty($_list)) { $_list = array(); } foreach($_list as $autoindex => $list): ?><p class="title wow fadeInDown" data-wow-delay=".1s"> <?php echo ($list["title"]); ?></p>
        <div class="detail_box">
          <dl>
            <dt class="wow fadeInUp" data-wow-delay=".1s"> <?php echo ($list["remark"]); ?></dt>
            <dd class="wow fadeInUp" data-wow-delay=".3s"><span>时间：<?php echo (date("Y-m-d H:i:s",$list["addtime"])); ?></span><span>阅读：<?php echo ($list["hits"]); ?></span></dd>
          </dl> 
          <div class="main wow fadeInUp" data-wow-delay=".5s">
           <?php echo ($list["content"]); ?>
          </div><?php endforeach;?>
          <div class="postscript wow fadeInUp" data-wow-delay=".7s">
            <div class="share"><img src="/Public/home/images/share.jpg" /></div>
            <p class="next">上一篇：<?php
 $_id = intval(3); $_pathname = "xinwen/gong"; $cateid=M("category")->where("pathname='".$_pathname."'")->getField("cateid"); $modelid=M("category")->where("pathname='".$_pathname."'")->getField("modelid"); $tablename=M("model")->where("modelid=$modelid")->getField("table"); $name="model_".$table['table']; $previd=$_id-1; $where = array('id'=> $previd, 'catid' => $cateid); $_list=M("$name")->where($where)->select(); if($_list){ $_list=Common\Lib\Category::url($_list); foreach($_list as $k=>$v){ $catelist=$v; } echo '<a href="'. $catelist['url'] .'" target>'. $catelist['title'] .'</a>'; }else{ echo "第一篇"; } ?></p>
            <p class="next">下一篇：<?php
 $_id = intval(3); $_pathname = "xinwen/gong"; $cateid=M("category")->where("pathname='".$_pathname."'")->getField("cateid"); $modelid=M("category")->where("pathname='".$_pathname."'")->getField("modelid"); $tablename=M("model")->where("modelid=$modelid")->getField("table"); $name="model_".$table['table']; $nextid=$_id+1; $where = array('id'=> $nextid, 'catid' => $cateid); $_list=M("$name")->where($where)->select(); if($_list){ $_list=Common\Lib\Category::url($_list); foreach($_list as $k=>$v){ $catelist=$v; } echo '<a href="'. $catelist['url'] .'" target>'. $catelist['title'] .'</a>'; }else{ echo "最后一篇"; } ?></p>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<!--sub_contentEnding-->

<div class="footer">
  <div class="f_box01">
    <div class="wrapper flow">
      <div class="left fl">
        		<?php
 $_id = intval(2); $where = array('cateid'=> $_id, 'is_nav' => 1); if(0 > 0){ $catelist = M('category')->where($where)->select(); }else{ $list = M('category')->select(); $_list = M('category')->where($where)->select(); $_catlist = Common\Lib\Category::subtree($list,$_id); $cate=array_merge($_list,$_catlist); $catelist=Common\Lib\Category::make_tree($cate); } if($_id==0){ $list = M('category')->where("is_nav=1")->select(); $cat=Common\Lib\Category::make_url($list); $catelist=Common\Lib\Category::make_tree($cat); } if (empty($catelist)) { $catelist = array(); } foreach($catelist as $auto => $cate): ?><dl class="list01 wow fadeInUp" data-wow-delay=".1s">
          <dt><a href=""><?php echo ($cate["catename"]); ?></a></dt>
          <?php if(is_array($cate['children'])): $i = 0; $__LIST__ = $cate['children'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><dd><a href="#apart08"><?php echo ($v["catename"]); ?></a></dd><?php endforeach; endif; else: echo "" ;endif; ?>
        </dl><?php endforeach;?>
        		<?php
 $_id = intval(3); $where = array('cateid'=> $_id, 'is_nav' => 1); if(0 > 0){ $catelist = M('category')->where($where)->select(); }else{ $list = M('category')->select(); $_list = M('category')->where($where)->select(); $_catlist = Common\Lib\Category::subtree($list,$_id); $cate=array_merge($_list,$_catlist); $catelist=Common\Lib\Category::make_tree($cate); } if($_id==0){ $list = M('category')->where("is_nav=1")->select(); $cat=Common\Lib\Category::make_url($list); $catelist=Common\Lib\Category::make_tree($cat); } if (empty($catelist)) { $catelist = array(); } foreach($catelist as $auto => $cate): ?><dl class="list01 wow fadeInUp" data-wow-delay=".1s">
          <dt><a href=""><?php echo ($cate["catename"]); ?></a></dt>
          <?php if(is_array($cate['children'])): $i = 0; $__LIST__ = $cate['children'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><dd><a href="#apart08"><?php echo ($v["catename"]); ?></a></dd><?php endforeach; endif; else: echo "" ;endif; ?>
        </dl><?php endforeach;?>
        		<?php
 $_id = intval(8); $where = array('cateid'=> $_id, 'is_nav' => 1); if(0 > 0){ $catelist = M('category')->where($where)->select(); }else{ $list = M('category')->select(); $_list = M('category')->where($where)->select(); $_catlist = Common\Lib\Category::subtree($list,$_id); $cate=array_merge($_list,$_catlist); $catelist=Common\Lib\Category::make_tree($cate); } if($_id==0){ $list = M('category')->where("is_nav=1")->select(); $cat=Common\Lib\Category::make_url($list); $catelist=Common\Lib\Category::make_tree($cat); } if (empty($catelist)) { $catelist = array(); } foreach($catelist as $auto => $cate): ?><dl class="list01 wow fadeInUp" data-wow-delay=".1s">
          <dt><a href=""><?php echo ($cate["catename"]); ?></a></dt>
          <?php if(is_array($cate['children'])): $i = 0; $__LIST__ = $cate['children'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><dd><a href="#apart08"><?php echo ($v["catename"]); ?></a></dd><?php endforeach; endif; else: echo "" ;endif; ?>
        </dl><?php endforeach;?>
      </div>
      <div class="right fr">
        <p class="magazine fl wow fadeInUp" data-wow-delay=".7s"><a href=""><img src="/Public/home/images/magazine.jpg" /></a></p>
        <div class="flat fr wow fadeInUp" data-wow-delay=".9s">
          <p class="code"><a href=""><img src="/Public/home/images/code.jpg" /></a></p>
          <p class="social"><a href="" class="social01"></a><a href="" class="social02"></a><a href="" class="social03"></a><a href="" class="social04"></a></p>
        </div>
      </div>
    </div>
  </div>
  <div class="f_box02">
    <div class="wrapper">
      <p class="f_box02 wow fadeIn" data-wow-delay=".3s">Copyright 2011 All Right Reserved 郑州市同鼎机械设备有限公司 版权所有 技术支持: <a href="">西维科技</a></p>
    </div>
  </div>
</div>
<!--footerEnding--> 
<script type="text/javascript" src="/Public/home/js/jquery-1.7.2.min.js"></script> 
<script src="/Public/home/js/jquery.superslide.2.1.1.js" type="text/javascript"></script> 
<script src="/Public/home/js/posfixed03.js"></script> 
<!--[if !IE]><!--><script type="text/javascript" src="/Public/home/js/returnTop.js"></script><!--<![endif]--> 
<!--[if gt IE 6]>
<script src="/Public/home/js/returnTop.js"></script>
<![endif]--> 
<script type="text/javascript" src="/Public/home/js/wow.min.js"></script>
</body>
</html>

<!--footerEnding--> 
<script type="text/javascript" src="/Public/home/js/jquery-1.7.2.min.js"></script> 
<script src="/Public/home/js/posfixed03.js"></script> 
<!--[if !IE]><!--><script type="text/javascript" src="/Public/home/js/returnTop.js"></script><!--<![endif]--> 
<!--[if gt IE 6]>
<script src="/Public/home/js/returnTop.js"></script>
<![endif]-->
<script type="text/javascript" src="/Public/home/js/wow.min.js"></script>
<script type="text/javascript" src="/Public/home/sc/hits.js"></script>
<script>
function GetQueryString(name){
  var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
  var r = window.location.search.substr(1).match(reg);
  if(r!=null)return  unescape(r[2]); return null;
}
var pathname=GetQueryString("pathname");
var id=GetQueryString("id");
var ajax;
if(window.XMLHttpRequest){ 
  ajax = new XMLHttpRequest();
}else{ 
  ajax = new ActiveXObject('Microsoft.XMLHTTP');
}
$(document).ready(function(){  
    $.get('/home/show/set_hits',{id:id,pname:pathname},function(data){
    });
});  
</script>